package com.atguigu.eduservice.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created by Miracle yaochengwei on 2020/9/17 8:41
 */
@Component
@FeignClient("service-order")//调用得服务名字
public interface OrdersClient {
    //根据课程id和用户id查询订单中订单状态
    @GetMapping("/eduorder/order/isBuyCourse/{courseId}/{memberId}")
    //为了后面返回方便，返回一个类型，不返回对象
    public Boolean isBuyCourse(@PathVariable("courseId") String courseId, @PathVariable("memberId") String memberId);

}
